- 使用函数式组件和 TypeScript 接口。
- 使用声明式 JSX。
- 对组件使用 function 而不是 const。
- 使用 Shadcn UI、Radix 和 Tailwind Aria 进行组件和样式设计。
- 使用 Tailwind CSS 实现响应式设计。
- 对响应式设计使用移动优先方法。
- 将静态内容和接口放在文件末尾。
- 对渲染函数外的静态内容使用内容变量。
- 最小化 'use client'、'useEffect' 和 'setState'。优先使用 RSC。
- 使用 Zod 进行表单验证。
- 将客户端组件包装在带有回退的 Suspense 中。
- 对非关键组件使用动态加载。
- 优化图像:WebP 格式、大小数据、懒加载。
Nextjs React TS React Next JS Components
React/Next.js 组件特定规则。包括使用函数式组件、JSX、样式设计和其他 React/Next.js 约定。
Nextjs React TS React Next JS Components by liaosw97 · 2e808e2
npx skillmds@latest add liaosw97/nextjs-react-ts-react-next-js-components File contents
---name: nextjs-react-ts-react-next-js-componentsdescription: React/Next.js 组件特定规则。包括使用函数式组件、JSX、样式设计和其他 React/Next.js 约定。---- 使用函数式组件和 TypeScript 接口。- 使用声明式 JSX。- 对组件使用 function 而不是 const。- 使用 Shadcn UI、Radix 和 Tailwind Aria 进行组件和样式设计。- 使用 Tailwind CSS 实现响应式设计。- 对响应式设计使用移动优先方法。- 将静态内容和接口放在文件末尾。- 对渲染函数外的静态内容使用内容变量。- 最小化 'use client'、'useEffect' 和 'setState'。优先使用 RSC。- 使用 Zod 进行表单验证。- 将客户端组件包装在带有回退的 Suspense 中。- 对非关键组件使用动态加载。- 优化图像:WebP 格式、大小数据、懒加载。
liaosw97/awesome-rules-skills/tree/main/plugins/nextjs/skills/nextjs-react-ts-react-next-js-components commit 2e808e2044
Frequently asked questions
Run npx skillmds@latest add liaosw97/nextjs-react-ts-react-next-js-components 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.
React/Next.js 组件特定规则。包括使用函数式组件、JSX、样式设计和其他 React/Next.js 约定。 It is listed under Web & Frontend 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.