globs:
alwaysApply: false
---
---
description: Comprehensive guide to React best practices, covering code organization, performance, security, testing, and common pitfalls. Adhering to these guidelines helps developers build maintainable, scalable, and high
2.2k19mo agoReviewMountCreate a free account to mount
guidelines for developing applications using Vite, covering aspects from code organization and performance to security and testing.
globs: **/*.{js,jsx,ts,tsx,vue,svelte}
---
- **Introduction:**
- This document outlines best practices
2.2k19mo agoReviewMountCreate a free account to mount
provides comprehensive best practices for using Vitest, covering code organization, testing strategies, performance, and security within Vitest projects. These guidelines ensure clean, maintainable, and reliable test suites.
globs
2.2k19mo agoReviewMountCreate a free account to mount
Based Lazy Loading:** Lazy load routes using `react-router-dom`'s `lazy` function.
## 4. Security Best Practices
### 4.1. Common Vulnerabilities and How to Prevent Them
- **Cross-Site Scripting (XSS):** Sanitize
2.2k19mo agoReviewMountCreate a free account to mount
Data Binding where appropriate
- **Fragment Lifecycle**: Properly handle fragment lifecycle with View Binding
## Security & Privacy
### Data Encryption
- **SQLCipher**: Encrypt local database
- **Sensitive Data**: Encrypt sensitive data using `EncryptData`
- **API Keys
1.9k34d agoReviewMountCreate a free account to mount
React components
- Use efficient data structures and algorithms
- Profile and optimize critical paths
Security Guidelines
- Never commit sensitive keys or credentials
- Use environment variables for configuration
- Validate all inputs
No other project uses it yet
1.8k23d agoReviewMountCreate a free account to mount
keys in environment variables, never hardcode them
- Implement server-side API calls for security
- Follow TypeScript best practices with proper typing
- Include comprehensive JSDoc comments
- Create fallbacks for when external
1.7k19mo agoReviewMountCreate a free account to mount