- 对于错误处理(在 error.tsx 中):
'use client' export default function Error({ error, reset, }: { error: Error & { digest?: string } reset: () => void }) { return ( <div> <h2>出现了错误!</h2> <button => reset()}>重试</button> </div> ); }
Nextjs 14 SEO Error Handling Rules
使用 error.tsx 文件在 Next.js 14 中实现错误处理的规则。
Nextjs 14 SEO Error Handling Rules by liaosw97 · f1c3fec
npx skillmds@latest add liaosw97/nextjs-14-seo-error-handling-rules File contents
---name: nextjs-14-seo-error-handling-rulesdescription: 使用 error.tsx 文件在 Next.js 14 中实现错误处理的规则。---- 对于错误处理(在 error.tsx 中): ```tsx 'use client' export default function Error({ error, reset, }: { error: Error & { digest?: string } reset: () => void }) { return ( <div> <h2>出现了错误!</h2> <button onClick={() => reset()}>重试</button> </div> ); } ```
liaosw97/awesome-rules-skills/tree/main/plugins/nextjs/skills/nextjs-14-seo-error-handling-rules commit f1c3feccf4
Frequently asked questions
Run npx skillmds@latest add liaosw97/nextjs-14-seo-error-handling-rules in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
使用 error.tsx 文件在 Next.js 14 中实现错误处理的规则。 It is listed under Marketing & Growth on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.