Glossário

Glossário — Next.js 16

"use cache" — diretiva que cacheia retorno de função/componente async (ch009) "use cache: private" — variante para dado dependente de request API, cache no browser (ch046) "use client" — marca fronteira do module graph server/cliente (ch006) "use server" — marca função como Server Function chamável via POST (ch008) after() — agenda trabalho pra depois da resposta terminar, sem bloquear (ch078) AGENTS.md — arquivo auto-gerado que direciona agentes de IA à doc do Next.js (ch022) app/ (App Router) — Server Components por padrão, layouts, roteamento por arquivo (ch057) App Shell — versão estática/reutilizável de rota, prefetchada uma vez (ch021) Cache Components — modo v16: rotas dinâmicas por padrão, cache opt-in via use cache (ch060) cacheComponents — flag em next.config.ts que habilita Cache Components (ch009) cacheHandler — plug de cache handler custom, compartilhado entre instâncias (ch323) cacheLife — define tempo de vida (stale/revalidate/expire) de um use cache (ch009) cacheTag — marca dado cacheado com tag pra invalidação sob demanda (ch010) connection() — adia execução não-determinística pra request time, usado com Suspense (ch009) cookies() — lê/escreve cookies em Server Components/Functions/Route Handlers (ch157) create-next-app — CLI oficial de scaffold (ch002) Draft Mode — bypassa cache pra editor de CMS ver conteúdo não publicado (ch040) dynamicParams — 404 vs geração sob demanda de params não previstos (ch057) error.js — error boundary de um route segment (ch011) favicon / icon / apple-icon — convenções de ícone de rota (ch139) fetch (estendido) — Web fetch com cache/next.revalidate/next.tags (ch159) forbidden() / unauthorized() — erros 403/401 (experimental, exige flag authInterrupts) (ch160) generateMetadata — gera metadata dinâmica dependente de dado (ch015) generateStaticParams — prerenderiza dynamic segments em build time (ch005) getServerSideProps — SSR por request, Pages Router (ch350) getStaticPaths — define paths a prerenderizar, Pages Router (ch356) getStaticProps — SSG em build time, Pages Router (ch351) global-error.js — erro do root layout, precisa <html>/<body> próprios (ch011) headers() — lê headers HTTP da requisição (ch166) ISR (Incremental Static Regeneration) — regeneração de página estática em background (ch305) Instant navigation — browser renderiza no clique com conteúdo cacheado/fallback (ch046) instrumentation.ts / register() — hook executado uma vez ao subir o servidor (ch047) Intercepting routes (.) — intercepta outra rota sem mudar a URL (ch118) layout.js — UI compartilhada de um segmento e seus filhos (ch004) loading.js — envolve page.js automaticamente num Suspense boundary (ch005) matcher — filtra em quais paths o Proxy roda (ch017) next.config.js — arquivo central de config, carregado só no server/build (ch194) next/dynamic — lazy loading, React.lazy + Suspense (ch051) next/font — self-hosting de fontes google/local (ch014) next/image — otimização automática de imagens (ch013) next/og (ImageResponse) — gera imagens dinamicamente via JSX/CSS (ch015) next/script — otimização de scripts de terceiros (ch322) next upgrade — atualiza pra latest e roda codemods (ch019) NextRequest / NextResponse — extensões de Web Request/Response (ch026) not-found.js / notFound() — UI e trigger de 404 (ch011) output: 'export' — static export, HTML hospedável em qualquer servidor (ch018) output: 'standalone' — pasta autocontida com server.js mínimo pro deploy (ch409) page.js — UI única de uma rota, sempre a folha (leaf) (ch004) Parallel Routes @folder — slots renderizados simultaneamente num layout (ch003) params / searchParams — props assíncronas de rota (Promise) (ch004) PPR (Partial Prerendering) — shell estático em CDN + partes dinâmicas atrás de Suspense (ch009) Private folders _folder — underscore tira a pasta do roteamento (ch003) Proxy (proxy.ts) — roda antes da request completar; sucessor do Middleware na v16 (ch017) redirect() — 307 (ou 303 em Server Action); deve ficar fora do try (ch074) refresh() — reroda trabalho dinâmico sem tocar entradas cacheadas (ch048) remotePatterns — autoriza hosts remotos pra <Image> (ch013) revalidatePath() — invalida cache de rota inteira por caminho (ch008) revalidateTag() — invalida cache por tag, stale-while-revalidate (ch010) Root layout — app/layout.tsx obrigatório, precisa <html>/<body> (ch002) Route Groups (folder) — organiza rotas sem afetar URL (ch003) Route Handler (route.js) — endpoint HTTP custom via Web Request/Response (ch016) RSC Payload — árvore de Server Components serializada (ch006) Server Action — Server Function usada com startTransition em form/mutação (ch008) Server Component — roda só no servidor; padrão no App Router (ch006) server-only / client-only — força build error se importado no ambiente errado (ch006) Suspense boundary — onde o shell estático termina e o streaming começa (ch285) template.js — como layout mas key única por navegação, reseta filhos (ch136) Turbopack — bundler padrão, substituível por Webpack via --webpack (ch002) unstable_cache — cacheia funções async não-fetch (ORM, DB direto) (ch028) updateTag() — expira cache imediatamente, só em Server Actions (read-your-own-writes) (ch182) use() — unwrap de Promise em Client Component (React) (ch006) useActionState[state, action, pending] pra feedback em Server Actions (ch008) useLinkStatus — expõe pending do <Link> (ch183) useOptimistic — valor otimista renderizado durante transição pendente (ch042) useParams / usePathname / useSearchParams — hooks de leitura de rota atual (ch185) useRouter — navegação programática (push, replace, refresh, prefetch) (ch188)