← スキル一覧に戻る

next-js-patterns
by aiskillstore
next-js-patternsは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。
⭐ 102🍴 3📅 2026年1月23日
SKILL.md
name: next-js-patterns description: Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.
Next.js Patterns
App Router
We use the Next.js 15 App Router located in app/.
Pages
- Location:
app/[route]/page.tsx - Component: Default export function.
- Client vs Server: Use
"use client"directive at the top for components requiring state (useState,useEffect) or browser APIs. otherwise default to Server Components.
Layouts
- Location:
app/layout.tsx(Root),app/[route]/layout.tsx(Nested). - Purpose: Wrappers for pages, holding navigation, fonts, and metadata.
Navigation
- Use
Linkfromnext/linkfor internal navigation. - Use
useRouterfromnext/navigationfor programmatic navigation (inside Client Components).
import Link from "next/link";
import { useRouter } from "next/navigation";
// Link
<Link href="/dashboard">Dashboard</Link>
// Router
const router = useRouter();
router.push('/login');
Data Fetching
- Server Components: Fetch directly using
await fetch()or DB calls. - Client Components: Use
useEffector SWR/TanStack Query (if added later). Currently using standardfetchinuseEffect.
Font Optimization
- We use
next/font/google(e.g., Poppins) inapp/layout.tsx. - Variable fonts are passed to
bodyclassName.
Metadata
- Define
export const metadata: Metadata = { ... }inpage.tsxorlayout.tsxfor SEO.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
✓人気
GitHub Stars 100以上
+5
✓最近の活動
3ヶ月以内に更新
+5
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です
