better-auth/.cursor/rules/performance.mdc

12 lines
384 B
Text
Raw Permalink Normal View History

2025-10-29 13:43:43 +05:00
---
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.