跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Next.js: useSearchParams with Suspense Pattern

Skill 已验证
98

Pattern for using useSearchParams hook with Suspense boundary in Next.js. Covers the required combination of 'use client' directive and Suspense wrapper when accessing URL query parameters in client components. Use when building search interfaces, filters, pagination, or any feature that needs to read/manipulate URL query parameters client-side.

AI 摘要

This extension details the required combination of the 'use client' directive and a Suspense wrapper for accessing URL query parameters in Next.js client components. It includes multiple code examples for search interfaces, filters, and pagination, along with explanations of common mistakes and best practices.

安装

npx skills add wsimmonds/claude-nextjs-skills

通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。

7 months ago
90 stars
MIT
更新于 2 days ago
查看源代码