better-auth/.cursor/rules/performance.mdc
 Илья Шалонин 8538ab969a first
2025-10-29 13:43:43 +05:00

11 lines
384 B
Text

---
description:
globs:
alwaysApply: true
---
This rule describes how to optimize the code for performance.
- Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
- Wrap client components in Suspense with fallback.
- Use dynamic loading for non-critical components.
- Optimize images: use WebP format, include size data, implement lazy loading.