网页 综合 更新时间 2026-10-01 00:00:00

Next.js Glossary

自动蜘蛛 nextjs.org 正文约 6000 字
Next.js Glossary
This glossary defines common terms used throughout the Next.js documentation, including terms related to routing, rendering, and caching.
The Next.js router introduced in version 13, built on top of React Server Components. It uses file-system based routing and supports layouts, nested routing, loading states, error handling, and more. Learn more in the App Router documentation.
A per-route prerender containing the parts of a page that don't depend on URL data. Cached content is included when its stale time is at least 5 minutes, since the shell is reused for longer than shorter-lived content stays fresh. Routes that read cookies() or headers() produce one that also includes session data, cached per session on the client. Used as the default prefetch payload during client navigations, the loading state when a per-link prefetch is not ready, and the fallback for ISR with Cache Components.
The stage when your application is being compiled. During build time, Next.js transforms your code into optimized files for production, generates static pages, and prepares assets for deployment. See the next build CLI reference.
A feature that enables component and function-level caching using the "use cache" directive. Cache Components allows you to mix static, cached, and dynamic content within a single route by prerendering a static HTML shell that's served immediately, while dynamic content streams in when ready. Configure cache duration with cacheLife(), tag cached data with cacheTag(), and invalidate on-demand with updateTag(). Learn more in the Cache Components guide.
Dynamic route segments that can match multiple URL parts using the [...folder]/page.js syntax. These segments capture all remaining URL segments and are useful for implementing features like documentation sites or file browsers. Learn more in Dynamic Route Segments.
JavaScript bundles sent to the browser. Next.js splits these automatically based on the module graph to reduce initial payload size and load only the necessary code for each page.
A React component that runs in the browser. In Next.js, Client Components can also be rendered on the server during initial page generation. They can use state, effects, event handlers, and browser APIs, and are marked with the "use client" directive at the top of a file. Learn more in Server and Client Components.
A navigation technique where the page content updates dynamically without a full page reload. Next.js uses client-side navigation with the <Link> component, keeping shared layouts interactive and preserving browser state. Learn more in Linking and Navigating.
An in-memory cache in the browser that stores RSC Payload for visited and prefetched routes. During client-side navigation, Next.js serves cached layouts and loading states instantly without a server request. Pages are not cached by default but are reused during browser back/forward navigation.
The client cache is cleared on page refresh. It can be invalidated programmatically with revalidateTag, revalidatePath, updateTag, router.refresh, cookies.set, or cookies.delete.
You can configure the client cache duration with staleTimes globally, or per-route via the stale property in cacheLife (recommended).
The process of dividing your application into smaller JavaScript chunks based on routes. Instead of loading all code upfront, only the code needed for the current route is loaded, reducing initial load time. Next.js automatically performs code splitting based on routes. Learn more in the Package Bundling guide.
When a component is rendered at request time rather than build time. A component becomes dynamic when it uses Request-time APIs.
Route segments that are generated from data at request time. Created by wrapping a folder name in square brackets (e.g., [slug]), they allow you to create routes from dynamic data like blog posts or product pages. Learn more in Dynamic Route Segments.
Configuration values accessible at build time or request time. In Next.js, variables prefixed with NEXT_PUBLIC_ are exposed to the browser, while others are only available server-side. Learn more in Environment Variables.
A React component that catches JavaScript errors in its child component tree and displays a fallback UI. In Next.js, create an error.js file to automatically wrap a route segment in an error boundary. Learn more in Error Handling.
Automatic font optimization using next/font. Next.js self-hosts fonts, eliminates layout shift, and applies best practices for performance. Works with Google Fonts and local font files. Learn more in Fonts.
A Turbopack feature that stores compiler artifacts on disk between runs, reducing work across next dev or next build commands for significantly faster compile times. Learn more in Turbopack FileSystem Caching.
React's process of attaching event handlers to the DOM to make server-rendered static HTML interactive. During hydration, React reconciles the server-rendered markup with the client-side JavaScript. Learn more in Server and Client Components.
Custom path mappings that provide shorthand references for frequently used directories. Import aliases reduce the complexity of relative imports and make code more readable and maintainable. Learn more in Absolute Imports and Module Path Aliases.
A technique that allows you to update static content without rebuilding the entire site. ISR enables you to use static generation on a per-page basis while revalidating pages in the background as traffic comes in. Learn more in the ISR guide or, when using Cache Components, ISR with Cache Components.
In Next.js, ISR is also known as Revalidation.
A routing pattern that allows loading a route from another part of your application within the current layout. Useful for displaying content (like modals) without the user switching context, while keeping the URL shareable. Learn more in Intercepting Routes.
Automatic image optimization using the <Image> component. Next.js optimizes images on-demand, serves them in modern for
访问原文 返回搜索 https://nextjs.org/docs/app/glossary
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。