BMAD-METHOD/.claude/rules/tailwind-css-nextjs-guide-c.../next-js-page-rules.mdc

11 lines
518 B
Plaintext

---
description: Specific rules for Next.js pages, including routing, data fetching, and image optimization.
globs: pages/**/*.tsx
---
- Use dynamic routes with bracket notation ([id].tsx)
- Validate and sanitize route parameters
- Prefer flat, descriptive routes
- Use getServerSideProps for dynamic data, getStaticProps/getStaticPaths for static
- Implement Incremental Static Regeneration (ISR) where appropriate
- Use next/image for optimized images
- Configure image layout, priority, sizes, and srcSet attributes