react
React/Next.js best practices for modern, performant applications.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
React/Next.js Standards
React 19 Best Practices
- Use Suspense, the
usehook, and promises as props - Prefer
use,useTransition, andstartTransitionoveruseEffect - You probably shouldn't use
useEffect
Component Design
- Keep components pure: don't declare constants or functions inside components
- Use React Query for client-side async data fetching
- Don't fetch data in
useEffect
Loading & Error States
- Prefer
<Suspense>anduseSuspenseQueryover React Query'sisLoading - Use
errorBoundarywith retry button
Cache Management
- Don't use magic strings for cache tags; use an enum/factory
- Use enum for React Query cache strings
Avoid
- Magic numbers/strings
- Data fetching in useEffect
- Constants inside component bodies
- isLoading patterns when Suspense works
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!