no-client-side-data-fetching
Disallow direct data fetching inside useEffect or useLayoutEffect.
Why
Effect-driven reads begin after rendering and can create request waterfalls, duplicate fetches, and loading-state layout shifts.
Fix
Fetch in a React Server Component or Server Action, or use a client cache such as SWR or React Query.
Examples
useEffect(() => { fetch("/api/users");}, []);import { useEffect } from "react";useEffect(() => { console.log("mounted");}, []);