prmbr-image-mksaas/.cursor/rules/nextjs-best-practices.mdc
javayhu 59ae1d9830 chore: update best practices documentation for various technologies
- Refine and expand best practices for:
  - AI SDK
  - Date-fns
  - Next.js
  - Radix UI
  - React
  - React Hook Form
  - Stripe
  - Tailwind CSS
  - TypeScript
  - Zustand
- Improve guidelines with more specific and actionable recommendations
- Enhance type safety and performance suggestions across different technologies
2025-03-09 08:44:53 +08:00

12 lines
535 B
Plaintext

---
description: Best practices for Next.js applications and routing
globs: **/*.{ts,tsx}
alwaysApply: false
---
- Utilize Next.js 15's new features like Server Actions for improved performance and security
- Implement proper error handling with `error.tsx` and `not-found.tsx` for better user experience
- Use `next-safe-action` for secure form submissions and API calls
- Use the `use client` directive for client components to optimize server-side rendering
- Leverage `next-themes` for easy theme management and dark mode support