界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

nextjs-core

nextjs-core

【数据与研究】Core Next.js patterns for App Router development including Server Components, Server Actions, route handlers, data fetching, and caching strategies

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: nextjs-core description: Core Next.js patterns for App Router development including Server Components, Server Actions, route handlers, data fetching, and caching strategies user-invocable: false disable-model-invocation: true version: 1.1.0 category: toolchain progressive_disclosure: entry_point: summary: "Server-first patterns with safe mutations (Server Actions) and explicit caching/revalidation" tags: [nextjs, app-router]

Next.js Core (App Router)

  • Server Components by default; minimal "use client".
  • Mutations in Server Actions (validate/authz; revalidate tags/paths).
  • Route handlers for APIs/webhooks; add loading/error boundaries.

Anti-patterns:

  • ❌ Fetch initial data in useEffect.
  • ❌ Cache or revalidate too broadly.
  • ❌ Client-only authz.

References: see references/ (server actions, fetching, caching, routing, auth, testing).

我的收藏