# react > React/Next.js best practices for modern, performant applications. - Author: Jamie Taylor - Repository: Popidge/portfolio_site - Version: 20260208180425 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-08 - Source: https://github.com/Popidge/portfolio_site - Web: https://mule.run/skillshub/@@Popidge/portfolio_site~react:20260208180425 --- --- name: react description: React/Next.js best practices for modern, performant applications. --- # React/Next.js Standards ## React 19 Best Practices - Use Suspense, the `use` hook, and promises as props - Prefer `use`, `useTransition`, and `startTransition` over `useEffect` - 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 `` and `useSuspenseQuery` over React Query's `isLoading` - Use `errorBoundary` with 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